<%@ page language="java" contentType="text/html"  pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>																
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
		<link rel="stylesheet" href="${CSS}bootstrap.min.css">
		<link rel="stylesheet" href="${CSS}font-awesome.css">
		<link rel="stylesheet" href="${CSS}form.css">
		<script src="${JS}jquery-3.2.1.min.js"></script>
		<script src="${JS}bootstrap.min.js"></script>
		<script src="${JS}../../layer/layer.js"></script>
		<script src="${JS}form.js"></script>
	</head>
	<body>
		<div class="container-fluid">
			<div class="row">
				<div class="form-box form-color-grey">
					<div class="form-header">
						<h6 class="form-title">
							<i class="fa fa-sort">
							</i>
							修改个人信息
						</h6>
					</div>
					<c:set var="method" value="ajax"/>
					<form class="form-horizontal" method="${method}" action="setUser" name="myform"> 
			        	<input type="hidden" name="aid" value="${user.aid}"/>
						<div class="form-body">
							<div class="form-group">
								<label class="col-sm-2 control-label">
									用户名：
								</label>
								<div class="col-sm-10">
									<input class="form-control" value="${user.aname}" name="aname" type="text" attribute="unempty gt5" placeholder="请输入用户名">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									真实姓名：
								</label>
								<div class="col-sm-10">
									<input class="form-control" value="${user.realName}" name="realName" type="text"  placeholder="请输入真实姓名">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									手机：
								</label>
								<div class="col-sm-10">
									<input class="form-control" value="${user.mobile}" name="mobile" type="text" attribute="mobile" placeholder="请输入手机号">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									邮箱：
								</label>
								<div class="col-sm-10">
									<input class="form-control" value="${user.email}" name="email" type="text" attribute="email" placeholder="请输入邮箱">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									密码：
								</label>
								<div class="col-sm-10">
									<input class="form-control" value="${user.password}" name="password" type="password" attribute="unempty gt5" placeholder="请输入密码">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-2 control-label">
									重复密码：
								</label>
								<div class="col-sm-10">
									<input class="form-control" value="${user.password}" name="passwordrepeat" type="password" attribute="unempty gt5"
									placeholder="请再次输入密码">
								</div>
							</div>
						</div>
						<div class="form-footer">
							<div class="form-group">
								<label class="col-sm-2">
								</label>
								<div class="col-sm-10">
									<button type="button" id="save" class="btn btn-sm btn-grey">
										<i class="fa fa-check">
										</i>
										提交
									</button>
									<button type="reset" id="reset" class="btn btn-sm btn-grey">
										<i class="fa fa-undo">
										</i>
										重置
									</button>
								</div>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<script>	
		var myform=form.init("myform");	
		$("#save").click(function(){
			myform.submit(function(res){
				layer.msg(res.msg);						
			});
		});
		$("#reset").click(function(){
			myform.reset();
		});
		</script>
	</body>
</html>				
				
				
				